  <template>
  <div class="app-container">
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px">
      <el-form-item label="物料名称" prop="itemName">
        <el-input
          v-model="queryParams.itemName"
          placeholder="请输入物料名称"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="物料图号" prop="itemId">
        <el-input
          v-model="queryParams.itemId"
          placeholder="请输入物料图号"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="规格型号" prop="spec">
        <el-input
          v-model="queryParams.spec"
          placeholder="请输入规格型号"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="仓库名称" prop="stockName">
        <el-input
          v-model="queryParams.stockName"
          placeholder="请输入仓库名称"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="库区名称" prop="kuquName">
        <el-input
          v-model="queryParams.kuquName"
          placeholder="请输入库区名称"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item>
        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
      </el-form-item>
    </el-form>

    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-select v-model="inventoryWay" placeholder="请选择" style="width: 120px">
          <el-option
            v-for="item in options"
            :key="item.value"
            :label="item.label"
            :value="item.value">
          </el-option>
        </el-select>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="primary"
          icon="el-icon-s-unfold"
          size="mini"
          @click="handleInventory"
          v-hasPermi="['business:CcStockInventory:add']"
        >生成盘点表</el-button>
      </el-col>

<!--      <el-col :span="1.5">-->
<!--        <el-button-->
<!--          type="primary"-->
<!--          plain-->
<!--          icon="el-icon-plus"-->
<!--          size="mini"-->
<!--          @click="handleAdd"-->
<!--          v-hasPermi="['business:CcStockInventory:add']"-->
<!--        >新增</el-button>-->
<!--      </el-col>-->
<!--      <el-col :span="1.5">-->
<!--        <el-button-->
<!--          type="success"-->
<!--          plain-->
<!--          icon="el-icon-edit"-->
<!--          size="mini"-->
<!--          :disabled="single"-->
<!--          @click="handleUpdate"-->
<!--          v-hasPermi="['business:CcStockInventory:edit']"-->
<!--        >修改</el-button>-->
<!--      </el-col>-->
<!--      <el-col :span="1.5">-->
<!--        <el-button-->
<!--          type="danger"-->
<!--          plain-->
<!--          icon="el-icon-delete"-->
<!--          size="mini"-->
<!--          :disabled="multiple"-->
<!--          @click="handleDelete"-->
<!--          v-hasPermi="['business:CcStockInventory:remove']"-->
<!--        >删除</el-button>-->
<!--      </el-col>-->
      <el-col :span="1.5">
        <el-button
          type="success"
          icon="el-icon-s-unfold"
          size="mini"
          :disabled="single"
          @click="inventoryJs"
          v-hasPermi="['business:CcStockInventory:edit']"
        >盘点核算</el-button>
      </el-col>
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>

    <el-table v-loading="loading" :data="CcStockInventoryMainList" @selection-change="handleSelectionChangeMain">
      <el-table-column type="selection" width="55" align="center" />
      <el-table-column type="expand">
        <template slot-scope="props">
          <el-table @selection-change="handleSelectionChange"  border v-loading="loading" :row-class-name="tableRowClassName"  height="450"  :data="CcStockInventoryList" >
            <el-table-column
              label="序号"
              type="index"
              align="center"
              width="50">
            </el-table-column>
            <el-table-column label="公司代码" align="center" prop="factoryCode" />
            <el-table-column label="公司名称" align="center" prop="factoryName" />
            <el-table-column label="盘点编码" align="center" prop="inventoryCode" width="180"/>
            <el-table-column label="盘点日期" align="center" prop="inventoryDate" width="180"/>
<!--            <el-table-column label="物料子图号" align="center" prop="itemCode" width="120"/>-->
            <el-table-column label="物料名称" align="center" prop="itemName" />
            <el-table-column label="物料图号" align="center" prop="itemId" />
            <el-table-column label="规格型号" align="center" prop="spec" />
            <el-table-column label="批次号" align="center" prop="lot" />
            <el-table-column label="库位数量" align="center" prop="kcNum" />
<!--            <el-table-column label="锁账数量" align="center" prop="resourceLocking" />-->
<!--            <el-table-column label="可用数量" align="center" prop="kyNum" />-->
            <el-table-column label="实盘数量" align="center" prop="spNum" />
            <el-table-column label="总数量" align="center" prop="totalNum" />
            <el-table-column label="差异数量" align="center" prop="cyNum" />
            <el-table-column label="供应商名称" align="center" prop="supplyName" width="120"/>
            <el-table-column label="物料单位" align="center" prop="unit" />
            <el-table-column label="仓库编码" align="center" prop="stockId" />
            <el-table-column label="仓库名称" align="center" prop="stockName" />
            <el-table-column label="库区编码" align="center" prop="kuquCode" />
            <el-table-column label="库区名称" align="center" prop="kuquName" />
            <el-table-column label="库位编码" align="center" prop="kuweiCode" />
            <el-table-column label="单价" align="center" prop="unitPrice" />
            <el-table-column label="金额" align="center" prop="totalPrice" />
            <el-table-column label="入库时间" align="center" prop="rukuDate" width="180"/>
            <el-table-column label="盘点人名" align="center" prop="inventoryUser" />
            <el-table-column label="盘点时间" align="center" prop="inventoryTime" width="180"/>
            <el-table-column label="盘点状态" align="center" prop="state">
              <template slot-scope="scope">
                <span v-if="scope.row.state=='0'">未盘点</span>
                <span v-if="scope.row.state=='1'" style="color: #13ce66">已盘点</span>
              </template>
            </el-table-column>
            <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="120">
              <template slot-scope="scope">
                <el-button
                  size="mini"
                  type="text"
                  icon="el-icon-edit"
                  @click="handleUpdate(scope.row)"
                  v-hasPermi="['business:CcStockInventory:edit']"
                >修改</el-button>
                <el-button
                  size="mini"
                  type="text"
                  icon="el-icon-delete"
                  @click="handleDelete(scope.row)"
                  v-hasPermi="['business:CcStockInventory:remove']"
                >删除</el-button>
              </template>
            </el-table-column>
          </el-table>
        </template>
      </el-table-column>
      <el-table-column label="公司代码" align="center" prop="factoryCode" />
      <el-table-column label="公司名称" align="center" prop="factoryName" />
      <el-table-column label="盘点编码" align="center" prop="inventoryCode" width="180"/>
      <el-table-column label="盘点日期" align="center" prop="inventoryDate" width="180"/>
      <el-table-column label="生成日期" align="center" prop="generateDate" width="180"/>
      <el-table-column label="核算状态" align="center" prop="appShow">
        <template slot-scope="scope">
          <span v-if="scope.row.appShow=='0'" style="color: #13ce66">已核算</span>
          <span v-if="scope.row.appShow=='1'">未核算</span>
        </template>
      </el-table-column>
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
        <template slot-scope="scope">
          <el-button
            size="mini"
            type="text"
            icon="el-icon-s-unfold"
            @click="inventoryJs(scope.row)"
            v-hasPermi="['business:CcStockInventory:edit']"
          >核算</el-button>
<!--          <el-button-->
<!--            size="mini"-->
<!--            type="text"-->
<!--            icon="el-icon-delete"-->
<!--            @click="handleDelete(scope.row)"-->
<!--            v-hasPermi="['business:CcStockInventory:remove']"-->
<!--          >删除</el-button>-->
        </template>
      </el-table-column>
    </el-table>

    <pagination
      v-show="total>0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />

    <!-- 添加或修改库存盘点管理对话框 -->
    <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
      <el-form ref="form" :model="form" :rules="rules" label-width="90px">
        <el-row>
          <el-col :span="12">
            <el-form-item label="公司代码" prop="factoryCode">
              <el-input v-model="form.factoryCode" placeholder="请输入公司代码" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="公司名称" prop="factoryName">
              <el-input v-model="form.factoryName" placeholder="请输入公司名称" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="盘点日期" prop="inventoryDate">
              <el-date-picker clearable
                v-model="form.inventoryDate"
                type="date"
                value-format="yyyy-MM-dd HH:mm:ss"
                placeholder="请选择盘点日期">
              </el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="物料子图号" prop="itemCode">
              <el-input v-model="form.itemCode" placeholder="请输入物料子图号" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="物料名称" prop="itemName">
              <el-input v-model="form.itemName" placeholder="请输入物料名称" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="物料图号" prop="itemId">
              <el-input v-model="form.itemId" placeholder="请输入物料图号" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="规格型号" prop="spec">
              <el-input v-model="form.spec" placeholder="请输入规格型号" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="批次号" prop="lot">
              <el-input v-model="form.lot" placeholder="请输入批次号" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="库位数量" prop="kcNum">
              <el-input v-model="form.kcNum" placeholder="请输入库位数量" />
            </el-form-item>
          </el-col>
<!--          <el-col :span="12">-->
<!--            <el-form-item label="锁账数量" prop="resourceLocking">-->
<!--              <el-input v-model="form.resourceLocking" placeholder="请输入资源锁账数量" />-->
<!--            </el-form-item>-->
<!--          </el-col>-->
<!--        </el-row>-->
<!--        <el-row>-->
<!--          <el-col :span="12">-->
<!--            <el-form-item label="可用数量" prop="kyNum">-->
<!--              <el-input v-model="form.kyNum" placeholder="请输入可用数量" />-->
<!--            </el-form-item>-->
<!--          </el-col>-->
          <el-col :span="12">
            <el-form-item label="实盘数量" prop="spNum">
              <el-input @input="spChange()" v-model="form.spNum" placeholder="请输入实盘数量" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="总数量" prop="totalNum">
              <el-input @input="spChange()" v-model="form.totalNum" placeholder="请输入总数量" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="差异数量" prop="cyNum">
              <el-input disabled v-model="form.cyNum" placeholder="请输入差异数量" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="供应商名称" prop="supplyName">
              <el-input v-model="form.supplyName" placeholder="请输入供应商名称" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="物料单位" prop="unit">
              <el-input v-model="form.unit" placeholder="请输入物料单位" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="仓库编码" prop="stockId">
              <el-input v-model="form.stockId" placeholder="请输入仓库编码" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="仓库名称" prop="stockName">
              <el-input v-model="form.stockName" placeholder="请输入仓库名称" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="库区编码" prop="kuquCode">
              <el-input v-model="form.kuquCode" placeholder="请输入库区编码" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="库区名称" prop="kuquName">
              <el-input v-model="form.kuquName" placeholder="请输入库区名称" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="库位编码" prop="kuweiCode">
              <el-input v-model="form.kuweiCode" placeholder="请输入库位编码" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="单价" prop="unitPrice">
              <el-input v-model="form.unitPrice" placeholder="请输入单价" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="金额" prop="totalPrice">
              <el-input v-model="form.totalPrice" placeholder="请输入金额" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="入库时间" prop="rukuDate">
              <el-date-picker clearable
                v-model="form.rukuDate"
                type="date"
                value-format="yyyy-MM-dd HH:mm:ss"
                placeholder="请选择入库时间">
              </el-date-picker>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="盘点人名" prop="inventoryUser">
              <el-input v-model="form.inventoryUser" placeholder="请输入盘点人名" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="盘点时间" prop="inventoryTime">
              <el-date-picker clearable
                v-model="form.inventoryTime"
                type="date"
                value-format="yyyy-MM-dd HH:mm:ss"
                placeholder="请选择盘点时间">
              </el-date-picker>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
            <el-form-item label="备注" prop="remark">
              <el-input v-model="form.remark" placeholder="请输入备注" />
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>
    <el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
      <el-upload
          ref="upload"
          :limit="1"
          accept=".xlsx, .xls"
          :headers="upload.headers"
          :action="upload.url + '?updateSupport=' + upload.updateSupport"
          :disabled="upload.isUploading"
          :on-progress="handleFileUploadProgress"
          :on-success="handleFileSuccess"
          :auto-upload="false"
          drag
      >
        <i class="el-icon-upload"></i>
        <div class="el-upload__text">将文件拖到此处，或<em>点击上传</em></div>
        <div class="el-upload__tip text-center" slot="tip">
          <!--  <div class="el-upload__tip" slot="tip">
              <el-checkbox v-model="upload.updateSupport" /> 是否更新已经存在的用户数据
            </div>-->
          <span>仅允许导入xls、xlsx格式文件。</span>
          <el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;" @click="importTemplate">下载模板</el-link>
        </div>
      </el-upload>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitFileForm">确 定</el-button>
        <el-button @click="upload.open = false">取 消</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import { selectCcStockInventoryMain,handleInventory,inventoryJs,listCcStockInventory, getCcStockInventory, delCcStockInventory, addCcStockInventory, updateCcStockInventory } from "@/api/business/CcStockInventory";
import {getToken} from "@/utils/auth";
export default {
  name: "CcStockInventory",
  data() {
    return {
      // 遮罩层
      loading: true,
      // 选中数组
      ids: [],
      codes: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      inventoryWay: "2",
      // 总条数
      total: 0,
      // 库存盘点管理表格数据
      CcStockInventoryList: [],
      CcStockInventoryMainList: [],
      options: [{
        value: '1',
        label: '按库位盘点'
      }, {
        value: '2',
        label: '按物料盘点'
      }],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        factoryName: null,
        itemCode: null,
        itemName: null,
        itemId: null,
        spec: null,
        lot: null,
        supplyName: null,
        classId: null,
        className: null,
        stockName: null,
        kuquName: null,
        pcId: null,
        saleOrderCode: null,
        contractCode: null,
        qijuCode: null,
        makerName: null,
        chukuId: null,
        rukuId: null,
        clientName: null,
      },
      upload: {
        // 是否显示弹出层
        open: false,
        // 弹出层标题
        title: "导入`CcStockInventory`信息",
        // 是否禁用上传
        isUploading: false,
        // 是否更新已经存在的用户数据
        updateSupport: 0,
        // 设置上传的请求头部
        headers: { Authorization: "Bearer " + getToken() },
        // 上传的地址
        url: process.env.VUE_APP_BASE_API + "/business/CcStockInventory/importData"
      },
      // 表单参数
      form: {},
      // 表单校验
      rules: {
      }
    };
  },
  created() {
    this.getList();
  },
  methods: {
    spChange(){
      this.form.cyNum = (this.form.spNum-0) - (this.form.totalNum-0)
    },
    /** 查询库存盘点管理列表 */
    getList() {
      this.loading = true;
      selectCcStockInventoryMain(this.queryParams).then(response => {
        this.CcStockInventoryMainList = response.rows;
        this.total = response.total;
        this.loading = false;
        listCcStockInventory(this.queryParams).then(response => {
          this.CcStockInventoryList = response.rows;
          // this.total = response.total;
          // this.loading = false;
        });
      });

    },
    // 取消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // 表单重置
    reset() {
      this.form = {
        id: null,
        factoryCode: null,
        factoryName: null,
        inventoryDate: null,
        itemCode: null,
        itemName: null,
        itemId: null,
        spec: null,
        lot: null,
        kcNum: null,
        resourceLocking: null,
        planLocking: null,
        lockNum: null,
        kyNum: null,
        spNum: null,
        totalNum: null,
        cyNum: null,
        supplyId: null,
        psztNum: null,
        lzztNum: null,
        supplyName: null,
        classId: null,
        className: null,
        unit: null,
        deptId: null,
        stockId: null,
        stockName: null,
        kuquCode: null,
        kuquName: null,
        kuweiCode: null,
        unitPrice: null,
        totalPrice: null,
        realPrice: null,
        realTotalPrice: null,
        cyTotalPrice: null,
        spTotalPrice: null,
        pcId: null,
        saleOrderCode: null,
        contractCode: null,
        contractNum: null,
        orderFill: null,
        isStop: null,
        isDaizhi: null,
        isJianhuo: null,
        isTuoguan: null,
        tuopanCode: null,
        qijuCode: null,
        txm: null,
        makerCode: null,
        makerName: null,
        qualityState: null,
        size: null,
        singleWeight: null,
        totalWeight: null,
        packingNum: null,
        chukuId: null,
        rukuId: null,
        rukuDate: null,
        upLine: null,
        downLine: null,
        stockSafe: null,
        useState: null,
        color: null,
        figure: null,
        caizhi: null,
        version: null,
        createBy: null,
        createTime: null,
        updateBy: null,
        updateTime: null,
        remark: null,
        clientCode: null,
        clientName: null,
        inventoryUser: null,
        inventoryTime: null
      };
      this.resetForm("form");
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map(item => item.id)
      this.single = selection.length!==1
      this.multiple = !selection.length
    },
    handleSelectionChangeMain(selection) {
      this.codes = selection.map(item => item.inventoryCode)
      this.single = selection.length!==1
      this.multiple = !selection.length
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.reset();
      this.open = true;
      this.title = "添加库存盘点管理";
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.reset();
      const id = row.id || this.ids
      getCcStockInventory(id).then(response => {
        this.form = response.data;
        this.open = true;
        this.title = "修改库存盘点管理";
      });
    },
    handleInventory(){
      const loading = this.$loading({
        lock: true,
        text: '正在生成盘点表，请稍后...',
        spinner: 'el-icon-loading',
        background: 'rgba(0, 0, 0, 0.7)'
      });
      handleInventory(this.inventoryWay).then(response => {
        this.$modal.msgSuccess("盘点表生成成功！");
        this.getList();
        loading.close();
      }).catch(reason=>{
        loading.close();
      });
    },
    inventoryJs(row){
      const loading = this.$loading({
        lock: true,
        text: '正在盘点核算，请稍后...',
        spinner: 'el-icon-loading',
        background: 'rgba(0, 0, 0, 0.7)'
      });
      const inventoryCode = row.inventoryCode || this.codes
      inventoryJs(inventoryCode).then(response => {
        this.$modal.msgSuccess("盘点核算成功！");
        this.getList();
        loading.close();
      }).catch(reason=>{
        loading.close();
      });
    },
    tableRowClassName({row, rowIndex}) {
      if (row.state == 0) {
        return 'warning-row';
      } else{
        return '';
      }
    },


    /** 提交按钮 */
    submitForm() {
      this.$refs["form"].validate(valid => {
        if (valid) {
          if (this.form.id != null) {
            updateCcStockInventory(this.form).then(response => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            addCcStockInventory(this.form).then(response => {
              this.$modal.msgSuccess("新增成功");
              this.open = false;
              this.getList();
            });
          }
        }
      });
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      const ids = row.id || this.ids;
      this.$modal.confirm('是否确认删除数据？').then(function() {
        return delCcStockInventory(ids);
      }).then(() => {
        this.getList();
        this.$modal.msgSuccess("删除成功");
      }).catch(() => {});
    },
    /** 导出按钮操作 */
    handleExport() {
      this.download('business/CcStockInventory/export', {
        ...this.queryParams
      }, `CcStockInventory_${new Date().getTime()}.xlsx`)
    },
    /** 导入按钮操作 */
    handleImport() {
      this.upload.title = "库存盘点管理导入";
      this.upload.open = true;
    },
    /** 下载模板操作 */
    importTemplate() {
      this.download('business/CcStockInventory/importTemplate', {
      }, `库存盘点管理模板.xlsx`)
    },
    /** 文件上传中处理 */
    handleFileUploadProgress(event, file, fileList) {
      this.upload.isUploading = true;
    },
    /** 文件上传成功处理 */
    handleFileSuccess(response, file, fileList) {
      this.upload.open = false;
      this.upload.isUploading = false;
      this.$refs.upload.clearFiles();
      this.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "导入结果", { dangerouslyUseHTMLString: true });
      this.getList();
    },
    /** 提交上传文件 */
    submitFileForm() {
      this.$refs.upload.submit();
    },
  }
};
</script>
<style lang="scss" scoped>
::v-deep .el-table .warning-row {
  background: #ffe4e1;
}
.demo-table-expand {
  font-size: 0;
}
.demo-table-expand label {
  width: 90px;
  color: #99a9bf;
}
.demo-table-expand .el-form-item {
  margin-right: 0;
  margin-bottom: 0;
  width: 50%;
}
</style>
